package com.ruicar.afs.cloud.channel.register.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruicar.afs.cloud.channel.register.condition.ChannelListingCarRelTempCondition;
import com.ruicar.afs.cloud.channel.register.entity.ChannelListingCarTemp;
import com.ruicar.afs.cloud.channel.register.mapper.ChannelListingCarTempMapper;
import com.ruicar.afs.cloud.channel.register.service.ChannelListingCarTempService;
import com.ruicar.afs.cloud.channel.register.vo.ChannelListingCarTempVo;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
@AllArgsConstructor
public class ChannelListingCarTempImpl extends ServiceImpl<ChannelListingCarTempMapper, ChannelListingCarTemp> implements ChannelListingCarTempService {

    @Override
    public List<ChannelListingCarTempVo> getCarById(Long id) {
        return baseMapper.getById(id);
    }

    @Override
    public IPage<List<ChannelListingCarTempVo>> getApplyListingCarTemp(Page page, ChannelListingCarRelTempCondition channel) {
        return baseMapper.getApplyListingCarTemp(page, channel);
    }

    @Override
    public List<ChannelListingCarTempVo> getCarByVin(Long channelId, String vin) {
        return baseMapper.getCarByVin(channelId, vin);
    }

    @Override
    public IPage<List<ChannelListingCarTempVo>> getRegister(Page page, ChannelListingCarRelTempCondition channel, List<String> roles, String key) {
        return baseMapper.getRegister(page, channel, roles, key);
    }

    @Override
    public List<Long> getRegisterIds(String userName, String key) {
        return baseMapper.getRegisterIds(userName, key);
    }

    @Override
    public IPage<List<ChannelListingCarTempVo>> getNewChannelListingCarTemp(Page page, ChannelListingCarRelTempCondition channel, List<Long> ids) {
        return baseMapper.getNewChannelListingCarTemp(page, channel, ids);
    }
}
